﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WorldPointToScreenPoint : MonoBehaviour {


    public GameObject target;
    public float offsetX;
    public float offsetY;
	// Use this for initialization
	void Start () {

        //if(target != null)
        //{
        target = GameObject.Find("Player11");
            var screenPos = Camera.main.WorldToScreenPoint(target.transform.position);
            this.gameObject.transform.position =new Vector3( screenPos.x + offsetX, screenPos.y + offsetY, screenPos.z) ;
        //}

	}
	
	
}
